#include <iostream>
#include <vector>
#include <climits>
 
using namespace std;
int main()
{
	int n = 0, x = 0;
	cin >> n >> x;
	vector<int> v(n);
	for (int i = 0; i < n; ++i)
	{
		cin >> v[i];
	}
	int res1 = 0, res2 = 0, reslen = INT_MAX, sum = 0;
	for (int left = 0, right = 0; right < n; ++right)
	{
		sum += v[right];
		while (sum >= x)
		{
			if (right - left + 1 < reslen)
			{
				res1 = left;
				res2 = right;
				reslen = right - left + 1;
			}
			sum -= v[left++];
		}
	}
	cout << res1 + 1 << " " << res2 + 1;
	return 0;
}